<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ page import="com.db.conn" %>
<%@ page import="java.sql.*" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>
    <link rel="stylesheet" href="<%=path %>/kindeditor/themes/default/default.css"/>
    <link rel="stylesheet" href="<%=path %>/kindeditor/plugins/code/prettify.css"/>
    <script charset="utf-8" src="<%=path %>/kindeditor/kindeditor.js"></script>
    <script charset="utf-8" src="<%=path %>/kindeditor/lang/zh_CN.js"></script>
    <script charset="utf-8" src="<%=path %>/kindeditor/plugins/code/prettify.js"></script>
    <style>
        .ms-panel {
            margin: 0;
            padding: 0;
            background: #fff;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.12);
        }
        
        .ms-panel-header {
            padding: 20px 24px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ms-panel-header h6 {
            margin: 0;
            font-size: 18px;
            font-weight: 500;
            color: #333;
        }
        
        .ms-panel-body {
            padding: 24px;
        }
        
        .add-form-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .form-group {
            margin-bottom: 24px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            color: #495057;
            font-weight: 500;
            text-align: left;
            padding-right: 0;
        }
        
        .required-mark {
            color: #dc3545;
            margin-right: 4px;
        }
        
        .form-control {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 14px;
            transition: border-color 0.3s ease;
        }
        
        .form-control:focus {
            border-color: #80bdff;
            outline: none;
            box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
        }
        
        .editor-container {
            border: 1px solid #ced4da;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .button-group {
            display: flex;
            gap: 12px;
            margin-top: 24px;
            justify-content: center;
        }
        
        .btn {
            display: inline-flex;
            align-items: center;
            padding: 8px 24px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: #28a745;
            color: #fff;
        }
        
        .btn-primary:hover {
            background: #218838;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .btn-secondary {
            background: #6c757d;
            color: #fff;
        }
        
        .btn-secondary:hover {
            background: #5a6268;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
    </style>
    <script>
        KindEditor.ready(function (K) {
            var editor1 = K.create('textarea[name="Textarea1"]', {
                cssPath: '<%=path %>/kindeditor/plugins/code/prettify.css',
                uploadJson: '<%=path %>/kindeditor/jsp/upload_json.jsp',
                fileManagerJson: '<%=path %>/kindeditor/jsp/file_manager_json.jsp',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        document.forms['example'].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        document.forms['example'].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>
</head>

<body class="ms-body ms-aside-left-open ms-primary-theme ms-has-quickbar">
    <div class="ms-content-wrapper">
        <div class="row">
            <div class="col-md-12">
                <div class="ms-panel">
                    <div class="ms-panel-header">
                        <h6>添加通知公告信息</h6>
                    </div>
                    <div class="ms-panel-body">
                        <div class="add-form-container">
                            <form action="<%=path %>/placard_Add" method="post">
                                <div class="form-group">
                                    <label class="form-label">
                                        <span class="required-mark">*</span>标题
                                    </label>
                                    <input name="txt_ptitle" type="text" id="txt_ptitle" class="form-control" required placeholder="请输入公告标题"/>
                                </div>
                                
                                <div class="form-group">
                                    <label class="form-label">
                                        <span class="required-mark">*</span>内容
                                    </label>
                                    <div class="editor-container">
                                        <textarea id="Textarea1" name="Textarea1" cols="100" rows="8" style="width:100%;height:400px;visibility:hidden;"></textarea>
                                    </div>
                                </div>
                                
                                <div class="button-group">
                                    <button type="submit" name="btnAdd" class="btn btn-primary">添加</button>
                                    <button type="button" class="btn btn-secondary" onclick="location.href='<%=path %>/admin/placard/placard_Manage.jsp'">返回</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>







